import os

import yaml
from xbase_util.common_util import setup_logger
from xbase_util.esreq import EsReq
from xbase_util.geo_util import GeoUtil

global_geo_util = GeoUtil()
current_dir = os.path.dirname(__file__)
file = open(os.path.join(current_dir, 'config.yaml'), "r")
base_config = yaml.safe_load(file)
file.close()
es_req = EsReq(base_config['es_url'])
sceneMap = base_config['scene']

error_logger = setup_logger("error","log")
common_logger = setup_logger("common","log")
capture_logger = setup_logger("capture","log")
save_logger = setup_logger("save","log")
predict_logger = setup_logger("predict","log")